package com.yl.chainStore.entity.system

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.yl.common.annotation.NoArg
import com.yl.common.getContext
import com.yl.users.common.NeedGerId

/**
 * @description :数据字典详情实体类
 * @author :吴枫
 * @create :2021-07-06 15:39:00
 */
@NoArg
@TableName("sys_dist_item_detail")
class CompanyDictionaryDetail(

	/**
	 * id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	var id: Long,

	/**
	 * 主表id
	 */
	@TableField("dist_id")
	var distId: Long,


	/**
	 * 项目value
	 */
	@TableField("item_name")
	var itemName: String,

	/**
	 * 公司id
	 */
	@TableField("company_id")
	var companyId: Long = getContext().companyId,

	/**
	 * 排序
	 */
	@TableField("order_num")
	var orderNum: Int = 1,


	/**
	 * 上层id
	 */
	@TableField("parent_id")
	var parentId: Long = 0,

	@TableField("item_value")
	var itemValue:String = id.toString(),

	/**
	 * 数据有效性
	 */
	@TableField("enabled")
	var enabled : Int = 1,

	/**
	 * 分院id
	 */
	@TableField("sub_company_id")
	var subCompanyId:Long = getContext().subCompanyId,

	@TableField(exist = false)
	var childList: List<CompanyDictionaryDetail>? = null

)
